function setTab(name,cursel){ 

 cursel_0=cursel; 

 for(var i=1; i<=links_len; i++){ 

 var menu = document.getElementById(name+i); 

 var menudiv = document.getElementById("con_"+name+"_"+i); 

 if(i==cursel){ 

 menu.className="off"; 

 menudiv.style.display="block"; 

 } 

 else{ 

 menu.className=""; 

 menudiv.style.display="none"; 

 } 

 } 

 } 

 function Next(){ 

 cursel_0++; 

 if (cursel_0>links_len)cursel_0=1 

 setTab(name_0,cursel_0); 

 } 

 var name_0='one'; 

 var cursel_0=1; 

 var links_len,iIntervalId; 

 onload=function(){ 

 var links = document.getElementById("tab1").getElementsByTagName('li') 

 links_len=links.length; 

 for(var i=0; i<links_len; i++){ 

 links[i].onmouseover=function(){ 

 clearInterval(iIntervalId); 

 } 

 } 

 document.getElementById("con_"+name_0+"_"+links_len).parentNode.onmouseover=function(){ 

 clearInterval(iIntervalId); 

 } 

 setTab(name_0,cursel_0); 

 } 

 $(function(){



	var aPage = $('#main .page a');		//鍒嗛〉鎸夐挳

	var aImg = $('#main .box img');		//鍥惧儚闆嗗悎

	var iSize = aImg.size();		//鍥惧儚涓暟

	var index = 0;		//鍒囨崲绱㈠紩

	var t;

	$('#btnLeft').click(function(){		//宸﹁竟鎸夐挳鐐瑰嚮

		index--;

		if(index<0){

			index=iSize-1

		}

		change(index)

	})

	$('#btnRight').click(function(){    //鍙宠竟鎸夐挳鐐瑰嚮

		index++;

		if(index>iSize-1){

			index=0

		}

		change(index)

	})

	//鍒嗛〉鎸夐挳鐐瑰嚮

	aPage.click(function(){

		index = $(this).index();

		change(index)

	});

	//鍒囨崲杩囩▼

	function change(index){

		aPage.removeClass('active');

		aPage.eq(index).addClass('active');

		aImg.stop();

		//闅愯棌闄や簡褰撳墠鍏冪礌锛屾墍浠ュ浘鍍�

		aImg.eq(index).siblings().animate({

			opacity:0

		},1000)

		//鏄剧ず褰撳墠鍥惧儚

		aImg.eq(index).animate({

			opacity:1

		},1000)

	}



	 

	function autoshow() {

		index=index+1;

		if(index<=iSize-1){

		   change(index);

		}else{

			index=0;

			change(index);

		}

			

	}

	int=setInterval(autoshow,6000);

	function clearInt() {

		$('#btnLeft,#btnRight,.page a').mouseover(function() {

			clearInterval(int);

		})

	

	}

	function setInt() {

		$('#btnLeft,#btnRight,.page a').mouseout(function() {

			int=setInterval(autoshow,6000);

		})

	}

	clearInt();

	setInt();

})



 



$(document).ready(function (){

	

	//鐐瑰嚮灏忓浘鍒囨崲澶у浘

	$("#thumbnail li a").click(function(){

		$(".zoompic img").hide().attr({ "src": $(this).attr("href"), "title": $("> img", this).attr("title") });

		$("#thumbnail li.current").removeClass("current");

		$(this).parents("li").addClass("current");

		return false;

	});

	$(".zoompic>img").load(function(){

		$(".zoompic>img:hidden").show();

	});

	

	//灏忓浘鐗囧乏鍙虫粴鍔�

	var $slider = $('.slider ul');

	var $slider_child_l = $('.slider ul li').length;

	var $slider_width = $('.slider ul li').width();

	$slider.width($slider_child_l * $slider_width);

	

	var slider_count = 0;

	

	if ($slider_child_l < 6) {

		$('#btn-right').css({cursor: 'auto'});

		$('#btn-right').removeClass("dasabled");

	}

	

	$('#btn-right').click(function() {

		if ($slider_child_l < 6 || slider_count >= $slider_child_l - 6) {

			return false;

		}

		

		slider_count++;

		$slider.animate({left: '-=' + $slider_width + 'px'}, 'fast');

		slider_pic();

	});

	

	$('#btn-left').click(function() {

		if (slider_count <= 0) {

			return false;

		}

		slider_count--;

		$slider.animate({left: '+=' + $slider_width + 'px'}, 'fast');

		slider_pic();

	});

	

	function slider_pic() {

		if (slider_count >= $slider_child_l - 6) {

			$('#btn-right').css({cursor: 'auto'});

			$('#btn-right').addClass("dasabled");

		}

		else if (slider_count > 0 && slider_count <= $slider_child_l - 6) {

			$('#btn-left').css({cursor: 'pointer'});

			$('#btn-left').removeClass("dasabled");

			$('#btn-right').css({cursor: 'pointer'});

			$('#btn-right').removeClass("dasabled");

		}

		else if (slider_count <= 0) {

			$('#btn-left').css({cursor: 'auto'});

			$('#btn-left').addClass("dasabled");

		}

	}

	

});